﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    [Table("line_standard")]
    public class LineStandard
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id"),Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 产线ID
        /// </summary>
        [Column("line_id"),Required()]
        public int LineID { get; set; }


        /// <summary>
        /// 产线代号
        /// </summary>
        [Column("line_code"), Required(),MaxLength(20)]
        public string LineCode { get; set; }

        /// <summary>
        /// 产线名称
        /// </summary>
        [Column("line_name"), Required(),MaxLength(20)]
        public string LineName { get; set; }


        /// <summary>
        /// 产线组名
        /// </summary>
        [Column("cal_group_name"), Required(),MaxLength(20)]
        public string CalGroupName { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [Column("fill_date"), Required()]
        public DateTime FillDate { get; set; }

        /// <summary>
        /// 平均UPPH
        /// </summary>
        [Column("upph"), Required()]
        public decimal Upph { get; set; }

        /// <summary>
        /// 产线人数
        /// </summary>
        [Column("empl_qty"), Required()]
        public int EmplQty { get; set; }

        /// <summary>
        /// 工作时间，以分钟计算
        /// </summary>
        [Column("work_time"), Required()]
        public decimal WorkTime { get; set; }


        /// <summary>
        /// 总UPPH
        /// </summary>
        [Column("total_upph"), Required()]
        public decimal TotalUpph { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user"), MaxLength(20)]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 更改人
        /// </summary>
        [Column("update_user"), MaxLength(20)]
        public string UpdateUser { get; set; }

        /// <summary>
        /// 更改日期
        /// </summary>
        [Column("update_date")]
        public DateTime? UpdateDate { get; set; }
    }
}
